package com.tpsix.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 菜单权限表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "sys_menu")
public class SysMenu implements Serializable {

    private static final long serialVersionUID = -2298187354271604425L;

    /**
     * 菜单ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 菜单权限标识
     */
    @TableField(value = "perms")
    private String perms;

    /**
     * 前端跳转URL
     */
    @TableField(value = "path")
    private String path;

    /**
     * 菜单组件
     */
    @TableField(value = "component")
    private String component;

    /**
     * 父菜单ID
     */
    @TableField(value = "parent_id")
    private Integer parentId;

    /**
     * 图标
     */
    @TableField(value = "icon")
    private String icon;

    /**
     * 排序
     */
    @TableField(value = "sort")
    private Integer sort;

    /**
     * 菜单类型 （类型   0：目录   1：菜单   2：按钮）
     */
    @TableField(value = "type")
    private Integer type;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    /**
     * 逻辑删除标记(0--正常 1--删除)
     */
    @TableField(value = "del_flag")
    private String delFlag;

    /**
     * 是否为外链
     */
    @TableField(value = "is_frame")
    private Boolean isFrame;

    @TableField(value = "title")
    private String title;

    @TableField(value = "redirect")
    private String redirect;

    @TableField(exist = false)
    private String parentName;

    @TableField(exist = false)
    private Integer level;

    @TableField(exist = false)
    private List<SysMenu> children = new ArrayList<>();

}